home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / mfpic / setup / dos / mfpic-bat.4dos < prev    next >
Internet Message Format  |  1992-11-25  |  7KB

  1. From root Sat Sep 12 19:37:54 1992
  2. Received: from munnari.OZ.AU by luxor.latrobe.edu.au (AIX 3.1/UCB 5.61/4.03)
  3.           id AA30340; Sat, 12 Sep 92 19:37:52 +1000
  4. Received: from uunet by munnari.oz.au with UUCP (5.83--+1.3.1+0.50)
  5.     id AA09629; Sat, 12 Sep 1992 19:35:37 +1000 (from emtex-user-request@methan.chemie.fu-berlin.de)
  6. Received: from methan.chemie.fu-berlin.de by relay1.UU.NET with SMTP 
  7.     (5.61/UUNET-internet-primary) id AA21065; Sat, 12 Sep 92 04:54:34 -0400
  8. Received: by methan.chemie.fu-berlin.de (/\@@/\ Smail3.1.25.1 #25.25)
  9.       id <m0mT2Wn-00002Va>; Fri, 11 Sep 92 06:22 MES
  10. Message-Id: <MAILQUEUE-101.920911001637.384@fasecon.econ.nyu.edu>
  11. To: emtex-user@methan.chemie.fu-berlin.de
  12. From: "Sunando Sen"  <SENS@fasecon.econ.nyu.edu>
  13. Date:         11 Sep 92 00:16:37 EST
  14. Subject:      Re: mfpic.bat - process a tex file with mfpic graphs
  15. Reply-To: sens@fasecon.econ.nyu.edu
  16. X-Mailer:     Pegasus Mail v2.3 (R3).
  17. Precedence: bulk
  18. Status: RO
  19.  
  20. Dear emTeX users,
  21.  
  22. I have made a slightly enhanced version of Jacques Gelinas' mfpic.bat.  To
  23. use it, you will need 4dos, a shareware replacement for DOS's command.com.
  24. If you are using 4os2, the OS/2 version of 4dos, you can simply rename the
  25. file to mfpic.cmd (renaming it to mfpic.btm should also work).  It should
  26. also be possible to rewrite the script in REXX, for those OS/2 users who
  27. do not use 4os2.  I might do it if there is sufficient interest.
  28.  
  29.   Please go over the file to make the necessary changes to the paths and
  30. the names of the executables.  Some of the lines are pretty long (don't
  31. worry, 4dos can handle them), hopefully they won't get mangled over the
  32. wires.
  33.  
  34.   Basically, this batch file gives you the chioce of printing and/or
  35. previewing the resulting dvi file.  It also puts the tfm and pk files
  36. where TeX and the dvidrv programs want them to be.  Finally, before
  37. exiting it cleans up all the files created by the mfpic run.
  38.  
  39. Sincerely,
  40.  
  41. Sunando Sen
  42. sens@fasecon.econ.nyu.edu
  43.  
  44. --------------------------- cut here --------------------------------
  45. @echo off
  46. rem        mfpic.bat - process a tex file including mfpic graphs
  47.  
  48. rem        WARNING!  THIS BATCH FILE NEEDS 4DOS OR 4OS2.
  49.  
  50. rem        4dos is an excellent shareware command shell for MS-DOS,
  51. rem        what command.com should have been.
  52.  
  53. rem        You can get 4dos from any SIMTEL20 mirror site in the directory
  54. rem                           msdos/4dos
  55. rem        two such sites are wuarchive.wustl.edu & oak.oakland.edu
  56.  
  57. rem        If you are using OS/2, you will need 4os2.
  58. rem        Rename this batch file to mfpic.cmd
  59. rem        4os2 can found at hobbes.nmsu.edu in the directory
  60. rem        pub/os2/all/shells
  61.  
  62. rem Vars  needed: set emtexdrv=c      (assuming usual emtex installation)
  63. rem Files needed: c:\emtex\texinput\mfpic.tex c:\emtex\mfinput\graphbas.mf
  64.  
  65. rem        first tex pass creates what.mf and an incomplete what.dvi
  66.  
  67. if "%1"=="" goto usage
  68.  
  69. SET TEXINPUT=c:\emtex\texinput
  70. SET BTEXFMT=c:\emtex\btexfmts
  71. SET TEXTFM=c:\emtex\tfm;c:\emtex\texfonts\tfm
  72.  
  73. tex386 &plain %1
  74.  
  75. del %1.dvi
  76.  
  77. SET MFINPUT=.;c:\emtex\mfinput
  78. SET BMFBAS=c:\emtex\bmfbases
  79. SET MFJOB=c:\emtex\mfjob
  80.  
  81. rem       metafont pass generates what.300gf and what.tfm
  82. for %%f in (*.mf) do mf386.exe &plain \mode=hplaser; input %%f
  83.  
  84. rem       gftopk pass converts what.300gf to what.pk
  85. for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do gftopk %%f
  86.  
  87. rem       move the pk files to the directory where dvidrv expects them
  88.  
  89. for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do move %@NAME[%%f].pk c:\emtex\texfonts\pixel.lj\%@EXT[%%f]dpi
  90.  
  91. rem       move the tfm files to the directory where TeX expcets them
  92.  
  93. for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do move %@NAME[%%f].tfm c:\emtex\texfonts\tfm
  94.  
  95. rem       second tex pass creates final what.dvi, using .\what.tfm
  96.  
  97. tex386 &plain %1
  98.  
  99. rem set textfm=c:\emtex\tfm;.
  100. rem tex %1
  101. rem set textfm=
  102.  
  103. rem       ask if you want to print it or preview it
  104. rem       after 10 seconds go to preview automatically
  105.  
  106. set ANSWER=V
  107.  
  108. inkey/w10 /k"VPQ" Do you want to pre(V)iew, (P)rint, or (Q)uit? %%ANSWER
  109. if "%ANSWER"=="P" goto printout
  110. if "%ANSWER"=="Q" goto cleanup
  111.  
  112. rem       call previewer with the following paths
  113.  
  114. rem  % lj.cnf (300x300 DPI using LJ fonts)
  115. rem  /pd={,c:\emtex\doc\{english,latex}\,$DVIDRVINPUT:}@i
  116. rem  /pl={c:\texfonts\,$DVIDRVFONTS:}lj_{0,h,1,2,3,4,5a,5b,sli}
  117. rem  /pf={,{c:\texfonts\,$DVIDRVFONTS:}pixel.lj\@Rrdpi\}@f{.pk,.pxl}
  118. rem dvidrv
  119.  
  120. dviscr7 @lj.cnf /fl=-1 /fb /ocr=1 /oa14 /o4 %1
  121.  
  122. rem       now ask if you want to print it ...
  123.  
  124. set TEXPRT=N
  125.  
  126. inkey/w10 /k"YN" Do You want to print your work of art? (Y/N) %%TEXPRT
  127. if "%TEXPRT"=="Y" goto printout
  128.  
  129. rem       if not, get rid of all the junk!
  130.  
  131. :cleanup
  132. for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do del c:\emtex\texfonts\pixel.lj\%@EXT[%%f]dpi\%@NAME[%%f].pk
  133.  
  134. for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do del c:\emtex\texfonts\tfm\%@NAME[%%f].tfm
  135.  
  136. for %%f in (*.300 *.329 *.360 *.432 *.518 *.622 *.746) do del %@NAME[%%f].*
  137.  
  138. for %%f in (*.dvi *.log *.?lg) do del %%f
  139.  
  140. rem       not to mention all the environment vars
  141.  
  142. SET TEXINPUT=
  143. SET BTEXFMT=
  144. SET TEXTFM=
  145. SET MFJOBOPT=
  146. SET MFINPUT=
  147. SET BMFBAS=
  148. SET MFJOB=
  149. SET ANSWER=
  150. SET TEXPRT=
  151. goto end
  152.  
  153. :printout
  154. dvihplj7 @lj.cnf /po=prn /fl=-1 /fb %1
  155. goto cleanup
  156.  
  157. :usage
  158. echo  Usage:  mfpic  what
  159. echo ------------------------------------------start of what.tex-----------
  160. --
  161. echo \input mfpic
  162. echo   \opengraphsfile{what1}
  163. echo     \picture[20]{-3}{3}{-3}{3}
  164. echo        \axes
  165. echo        \function{-2,2,0.1,(x**3-x)/3}
  166. echo     \endpicture
  167. echo   \closegraphsfile
  168. echo The first line opens up the picture environment and
  169. echo establishes the coordinate system.  The coordinate scale
  170. echo is 20 points per coordinate unit (x- and y-axis scales
  171. echo the same in this case), with bounds on both axes being -3 and 3.
  172. echo The second line draws the axes.  The third line
  173. echo plots a smooth Bezier interpolation of the function
  174. echo $f(x)=(x^3-x)/3$ on the domain $-2<=x<=2$, through points
  175. echo with x values 0.1 units apart.
  176. echo The fourth line closes the picture environment.
  177. echo Regards, Tom Leathrum, moth@dartmouth.edu
  178. echo \bye
  179. echo ------------------------------------------end  of what.tex------------
  180. -
  181.  
  182. :end
  183. rem                                 J. Gelinas, 9 sept 1992, gelinas@cmr.ca
  184. rem with some modest changes by     Sunando Sen, 10 sept 1992,
  185. rem                                 sens@fasecon.econ.nyu.edu
  186. --------------------------- cut here --------------------------------
  187.  
  188.